'use strict';

const express = require('express');
const constant = require('../../common/constant');
let router = express.Router();

router.get('/', function(req, res) {
    let btnUrl;
    let btnTxt;
    if (req.session.loginType === constant.LOGIN_TYPE_COU) {
        btnUrl = '/Login';
        btnTxt = '重新登陆';
    } else if (req.session.loginType === constant.LOGIN_TYPE_ADM) {
        btnUrl = '/Login';
        btnTxt = '重新登陆';
    } else {
        btnUrl = '/takExpInp';
        btnTxt = '重新取件';
    }

    res.render('./com/error', { btnUrl, btnTxt });
});

module.exports = router;